package com.travel.service.impl;

import com.travel.mapper.RouteMapper;
import com.travel.model.Route;
import com.travel.service.IRouteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * routeService业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-01
 */
@Service
public class RouteServiceImpl implements IRouteService
{
    @Autowired
    private RouteMapper routeMapper;

    /**
     * 查询route
     * 
     * @param id route主键
     * @return route
     */
    @Override
    public Route selectRouteById(Long id)
    {
        return routeMapper.selectRouteById(id);
    }

    /**
     * 查询route列表
     * 
     * @param route route
     * @return route
     */
    @Override
    public List<Route> selectRouteList(Route route)
    {
        return routeMapper.selectRouteList(route);
    }

    /**
     * 新增route
     * 
     * @param route route
     * @return 结果
     */
    @Override
    public int insertRoute(Route route)
    {
        return routeMapper.insertRoute(route);
    }

    /**
     * 修改route
     * 
     * @param route route
     * @return 结果
     */
    @Override
    public int updateRoute(Route route)
    {
        return routeMapper.updateRoute(route);
    }

    /**
     * 批量删除route
     * 
     * @param ids 需要删除的route主键
     * @return 结果
     */


    /**
     * 删除route信息
     * 
     * @param id route主键
     * @return 结果
     */
    @Override
    public int deleteRouteById(Long id)
    {
        return routeMapper.deleteRouteById(id);
    }
}
